/* ======================================= */
/* BASE64 ENCODER & DECODER                */
/* ======================================= */

.base64-card-content {
  max-width: 100%;
  margin: 0 auto;
  padding: 35px;
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.base64-card-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue), var(--accent-purple));
  background-size: 200% 100%;
  animation: base64GradientShift 3s ease infinite;
}

@keyframes base64GradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Titel & Intro */
.base64-card-content h1 {
  color: var(--text-primary);
  font-size: 2rem;
  margin-bottom: 8px;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.base64-intro {
  text-align: center;
  color: #8b92a8;
  font-size: 0.95rem;
  margin-bottom: 30px;
  line-height: 1.6;
  font-weight: 400;
}

/* Mode Selector */
.base64-mode-selector {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.base64-mode-btn {
  padding: 14px 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(45, 55, 72, 0.5);
  border-radius: 12px;
  color: #8b92a8;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.base64-mode-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.base64-mode-btn:hover::before {
  width: 300px;
  height: 300px;
}

.base64-mode-btn.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  border-color: #8b5cf6;
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
}

.base64-mode-btn:hover:not(.active) {
  border-color: #6d28d9;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Converter Section */
.base64-converter-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: start;
}

.base64-converter-left,
.base64-converter-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.base64-input-group,
.base64-output-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.base64-input-group label,
.base64-output-group label {
  color: #60a5fa;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.base64-textarea {
  width: 100%;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  color: #e2e8f0;
  border: 2px solid rgba(45, 55, 72, 0.5);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: 'Courier New', 'Roboto Mono', monospace;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.3s ease;
  box-sizing: border-box;
  min-height: 280px;
}

.base64-textarea::placeholder {
  color: #4a5568;
  opacity: 1;
}

.base64-textarea:focus {
  border-color: #8b5cf6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

.base64-textarea.base64-output {
  background: rgba(0, 0, 0, 0.3);
  cursor: default;
}

.base64-char-count {
  font-size: 0.85rem;
  color: #64748b;
  text-align: right;
  font-family: 'Roboto Mono', monospace;
  margin-top: 8px;
}

/* Action Buttons */
.base64-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.base64-btn-primary,
.base64-btn-secondary,
.base64-btn-copy {
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  position: relative;
  overflow: hidden;
}

.base64-btn-primary::before,
.base64-btn-secondary::before,
.base64-btn-copy::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.base64-btn-primary:hover::before,
.base64-btn-secondary:hover::before,
.base64-btn-copy:hover::before {
  width: 400px;
  height: 400px;
}

.base64-btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.base64-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.base64-btn-primary:active {
  transform: translateY(0);
}

.base64-btn-secondary {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  box-shadow: 0 4px 15px rgba(75, 85, 99, 0.3);
}

.base64-btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(75, 85, 99, 0.4);
}

.base64-btn-secondary:active {
  transform: translateY(0);
}

.base64-btn-copy {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.base64-btn-copy:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.base64-btn-copy:active {
  transform: translateY(0);
}

.base64-btn-primary:disabled,
.base64-btn-secondary:disabled,
.base64-btn-copy:disabled {
  background: rgba(45, 55, 72, 0.5);
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.5;
}

/* Feedback boxes */
.base64-error-box,
.base64-success-box {
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  display: none;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
  margin-top: 15px;
}

.base64-error-box {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.base64-success-box {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.base64-error-box.base64-visible,
.base64-success-box.base64-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Info Section */
.base64-info-section {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(45, 55, 72, 0.5);
  border-radius: 12px;
  padding: 20px;
  margin-top: 30px;
}

.base64-info-section h3 {
  color: #60a5fa;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.base64-info-section p {
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 12px;
}

.base64-info-section ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 16px;
}

.base64-info-section li {
  color: #94a3b8;
  padding: 6px 0;
  line-height: 1.5;
}

.base64-example {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(45, 55, 72, 0.5);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.base64-example strong {
  color: #60a5fa;
  display: block;
  margin-bottom: 8px;
}

.base64-example code {
  color: #e2e8f0;
  background: rgba(139, 92, 246, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Quick Examples */
.base64-quick-examples {
  margin-top: 25px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(45, 55, 72, 0.5);
  border-radius: 12px;
}

.base64-quick-examples h3 {
  color: #60a5fa;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
  text-align: center;
}

.base64-example-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.base64-example-btn {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(45, 55, 72, 0.5);
  border-radius: 10px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'Courier New', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.base64-example-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: #8b5cf6;
  color: #e2e8f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .base64-card-content {
    padding: 20px 12px;
    border-radius: 16px;
  }
  
  .base64-card-content h1 {
    font-size: 1.5rem;
  }
  
  .base64-intro {
    font-size: 0.88rem;
    margin-bottom: 20px;
  }

  .base64-mode-selector {
    flex-direction: column;
  }

  .base64-mode-btn {
    width: 100%;
  }

  .base64-converter-section {
    grid-template-columns: 1fr;
  }

  .base64-action-buttons {
    grid-template-columns: 1fr;
  }

  .base64-textarea {
    font-size: 0.9rem;
    padding: 14px;
  }

  .base64-example-buttons {
    grid-template-columns: 1fr;
  }

  .base64-example-btn {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .base64-card-content {
    padding: 16px 10px;
  }

  .base64-card-content h1 {
    font-size: 1.3rem;
  }

  .base64-intro {
    font-size: 0.85rem;
  }

  .base64-mode-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
  }
}